View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001247 | K18X001.00 SKB SWAN | SW | public | 2021-05-25 16:12 | 2021-05-27 20:05 |
| Reporter | (ALTech) Wooshin Kang | Assigned To | (ALTech) Wooshin Kang | Due Date | 2021-05-26 17:06 |
| Priority | normal | Severity | s2-severe | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0001247: [SWAN] can you check log message ? | ||||
| Description | Can you check why below log message is displayed repeatedly in 1 sec Period ? " 05-16 09:12:22.088 357 898 I AudioFlinger: systemReady 05-16 09:12:22.088 357 898 W AudioFlinger: systemReady called twice " Thanks. | ||||
| Tags | No tags attached. | ||||
| Attach Tags | |||||
|
|
Hi Wooshin, I think this is google's code to print the message. When AudioService is ready, it will check AudioFlinger::systemReady() in every 1 second. The following is the source code trace for your rederence. ================================================================= In frameworks/base/services/core/java/com/android/server/audio/AudioService.java // retry delay in case of failure to indicate system ready to AudioFlinger private static final int INDICATE_SYSTEM_READY_RETRY_DELAY_MS = 1000; public void onSystemReady() { ... onIndicateSystemReady(); } void onIndicateSystemReady() { if (AudioSystem.systemReady() == AudioSystem.SUCCESS) { sendMsg(mAudioHandler, MSG_INDICATE_SYSTEM_READY, SENDMSG_REPLACE, 0, 0, null, INDICATE_SYSTEM_READY_RETRY_DELAY_MS); } } private class AudioHandler extends Handler { public void handleMessage(Message msg) { switch (msg.what) { ... case MSG_INDICATE_SYSTEM_READY: onIndicateSystemReady(); break; } } } In frameworks/av/media/libaudioclient/AudioSystem.cpp status_t AudioSystem::systemReady() { const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); if (af == 0) return NO_INIT; return af->systemReady(); } In frameworks/av/services/audioflinger/AudioFlinger.cpp status_t AudioFlinger::systemReady() { Mutex::Autolock _l(mLock); ALOGI("%s", __FUNCTION__); if (mSystemReady) { ALOGW("%s called twice", __FUNCTION__); return NO_ERROR; } mSystemReady = true; for (size_t i = 0; i < mPlaybackThreads.size(); i++) { ThreadBase *thread = (ThreadBase *)mPlaybackThreads.valueAt(i).get(); thread->systemReady(); } for (size_t i = 0; i < mRecordThreads.size(); i++) { ThreadBase *thread = (ThreadBase *)mRecordThreads.valueAt(i).get(); thread->systemReady(); } return NO_ERROR; } |
|
|
Question answered. |
|
|
Hi River, // retry delay in case of failure to indicate system ready to AudioFlinger private static final int INDICATE_SYSTEM_READY_RETRY_DELAY_MS = 1000; I think that it should be called when system is not ready, but log message is displayed repeatedly in 1 sec period. I wonder it this behavior OK..? |
|
|
Hi Wooshin, After more check on the code, I found Sptek changed the code of framework that cause this behavior (there is no any comment in the source code, so I did not notice Sptek change it.) In the following commit, it change the onIndicateSystemReady(). Please check with Sptek why they change it. (Note, this Sptek change is not applied to eagle 10). commit b39f6661ed5fe35b28e270eb7e64ff1c4f6aa323 Author: iohwang <iohwang@sptek.co.kr> Date: Tue Aug 11 18:44:31 2020 +0900 Add BTV,NUGU Stream Type =============before Sptek change it (google orignial code) ====================== void onIndicateSystemReady() { if (AudioSystem.systemReady() == AudioSystem.SUCCESS) { return; } sendMsg(mAudioHandler, MSG_INDICATE_SYSTEM_READY, SENDMSG_REPLACE, 0, 0, null, INDICATE_SYSTEM_READY_RETRY_DELAY_MS); } |
|
|
Hi River, Thanks for information. |
|
|
Thanks for your analysis. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-05-25 16:12 | (ALTech) Wooshin Kang | New Issue | |
| 2021-05-25 16:12 | (ALTech) Wooshin Kang | Status | new => assigned |
| 2021-05-25 16:12 | (ALTech) Wooshin Kang | Assigned To | => (SW) Jacky Chiang |
| 2021-05-25 18:39 | (SW) Jacky Chiang | Assigned To | (SW) Jacky Chiang => (SW) River Wong |
| 2021-05-26 09:49 |
|
Note Added: 0007235 | |
| 2021-05-26 09:49 |
|
Note Edited: 0007235 | |
| 2021-05-26 09:50 |
|
Assigned To | (SW) River Wong => (ALTech) Wooshin Kang |
| 2021-05-26 09:50 |
|
Status | assigned => feedback |
| 2021-05-26 09:50 |
|
Note Added: 0007236 | |
| 2021-05-26 10:29 | (ALTech) Wooshin Kang | Note Added: 0007239 | |
| 2021-05-26 10:30 | (ALTech) Wooshin Kang | Assigned To | (ALTech) Wooshin Kang => (SW) River Wong |
| 2021-05-26 10:48 |
|
Note Added: 0007242 | |
| 2021-05-26 10:58 |
|
Status | feedback => acknowledged |
| 2021-05-26 10:59 |
|
Assigned To | (SW) River Wong => (ALTech) Wooshin Kang |
| 2021-05-26 12:19 | (ALTech) Wooshin Kang | Note Added: 0007246 | |
| 2021-05-27 20:05 | (ALTech) Wooshin Kang | Status | acknowledged => closed |
| 2021-05-27 20:05 | (ALTech) Wooshin Kang | Resolution | open => fixed |
| 2021-05-27 20:05 | (ALTech) Wooshin Kang | Note Added: 0007282 |